package cac.fenjian.resource.msworkbinbasic.dao;

import cac.fenjian.resource.MsWorkbinBasic.dto.MsWorkbinBasicDTO;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public interface MsWorkbinBasicDao {
    /**
     * 条件分页查询
     * @param msWorkbinDTO
     * @param orderBy
     * @param keyWords
     * @return
     */
    public Page<MsWorkbinBasicDTO> searchMsWorkbinBasicByPage(@Param("bean")MsWorkbinBasicDTO msWorkbinDTO, @Param("orderBy") String orderBy, @Param("keyWords")String keyWords);

    public Page<Map<String,String>> searchMsWorkbin(@Param("bean")MsWorkbinBasicDTO msWorkbinDTO, @Param("orderBy") String orderBy, @Param("keyWords")String keyWords);
    /**
     * 根据主键id查询数据
     * @param id 主键
     * @return
     */
    public MsWorkbinBasicDTO findMsWorkbinBasicById(String id);
    /**
     * 新增一条数据
     * @param
     * @return
     */
    public int insertMsWorkbinBasicDTO(@Param("map") Map map,@Param("msWorkbinId") String id, @Param("creationDate") Date creatDate);

    /**
     * 更新部分对象
     *
     * @param
     * @return
     */
    public int updateMsWorkbinDTO(@Param("map") Map map, @Param("lastUpDate") Date lastUpDate);

    /**
     * 按主键删除
     *
     * @param msWorkbinId 主键id
     * @return int
     */
    public int deleteMsWorkbinBasicById(String msWorkbinId);

    List<HashMap> queryWorkbinMaterial(@Param("map") HashMap queryMap);

    int updateWorkbinMaterial(@Param("map") HashMap map);
    int updateSetEmptyBoxes();
}
